Buffered Adaptive Radix – a fast, stable sorting algorithm that trades speed for space at runtime when needed

نویسنده

  • Arne Maus
چکیده

This paper introduces Buffered Adaptive Radix (BARsort) that adds two improvements to the well known right-to-left Radix sorting algorithm (Right Radix or just Radix). The first improvement, the adaptive part, is that the size of the sorting digit is adjusted according to the maximum value of the elements in the array. This makes BARsort somewhat faster than ordinary 8-bit Radix sort (Radix8). The second and most important improvement is that data is transferred back and forth between the original array and a buffer that can be only a percentage of the size of the original array, as opposed to traditional Radix where that second array is the same length as the original array. Even though a buffer size of 100% of the original array is the fastest choice, any percentage larger than 6% gives a good to acceptable performance. This result is also explained analytically. This flexibility in memory requirement is important in programming languages such as Java where the heap size is fixed at load time and the new operator for constructing the extra array can terminate the program if the requested space is not available. BARsort avoids this problem. In this paper the stable BARsort algorithm is compared to the two non-stable algorithms Quicksort and Flashsort and the ordinary Radix8, which is stable. This is done for 14 different distributions of data and n, the length of the array, varying from 50 to 97M. For the standard distribution, uniform 0:n-1, the relative performance of BARsort versus Quicksort, Flashsort and Radix8 is also shown for Sun UltraSparcIIIi, Intel Core Duo 2500T, Intel Pentium IV and AMD Opteron 254 based machines. A model for the observed execution time is also presented, and, finally, BARsort is proposed as a candidate for a general replacement for Quicksort because of its faster performance and its stable sorting quality.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

ARL, a faster in-place, cache friendly sorting algorithm

This paper introduces a new, faster sorting algorithm (ARL – Adaptive Left Radix) that does in-place, non-stable sorting. Left Radix, often called MSD (Most Significant Digit) radix, is not new in itself, but the adaptive feature and the in-place sorting ability are new features. ARL does sorting with only internal moves in the array, and uses a dynamically defined radix for each pass. ALR is a...

متن کامل

Efficient Adaptive In-Place Radix Sorting

This paper presents a new in-place pseudo linear radix sorting algorithm. The proposed algorithm, called MSL (Map Shuffle Loop) is an improvement over ARL (Maus, 2002). The ARL algorithm uses an in-place permutation loop of linear complexity in terms of input size. MSL uses a faster permutation loop searching for the next element to permute group by group, instead of element by element. The alg...

متن کامل

Fast 4-way parallel radix sorting on GPUs

Efficient sorting is a key requirement for many computer science algorithms. Acceleration of existing techniques as well as developing new sorting approaches is crucial for many realtime graphics scenarios, database systems, and numerical simulations to name just a few. It is one of the most fundamental operations to organize and filter the ever growing massive amounts of data gathered on a dai...

متن کامل

IPS, sorting by transforming an array into its own sorting permutation with almost no space overhead

This paper presents two new algorithms for inline transforming an integer array ‘a’ into its own sorting permutation that is: after performing either of these algorithms, a[i] is the index in the unsorted input array ‘a’ of its i’th largest element (i=0,1..n-1). The difference between the two IPS (Inline Permutation Substitution) algorithms is that the first and fastest generates an unstable pe...

متن کامل

Adaptive search area for fast motion estimation

In this paper a new method for determining the search area for motion estimation algorithm based on block matching is suggested. In the proposed method the search area is adaptively found for each block of a frame. This search area is similar to that of the full search (FS) algorithm but smaller for most blocks of a frame. Therefore, the proposed algorithm is analogous to FS in terms of reg...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007